<HTML><HEAD><TITLE>is_suspension(?Term)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Type Testing</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>is_suspension(?Term)</H1>
Succeeds if Term is a sleeping suspension.


<DL>
<DT><EM>Term</EM></DT>
<DD>Prolog term.
</DD>
</DL>
<H2>Description</H2>
   Used to test whether Term is a sleeping suspension, i.e.  a suspension
   that has not yet been executed.  type_of/2 can be used to test for a
   sleeping or executed suspension.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>is_suspension(?) is semidet
</UL>
<H3>Fail Conditions</H3>
Fails if Term is not a sleeping suspension
<H2>Examples</H2>
<PRE>
Success:
      make_suspension(true, 2, S), is_suspension(S).

Fail:
      is_suspension(X).

      is_suspension(a).

      make_suspension(true, 2, S), schedule_suspensions(1, s(S)),
      wake, is_suspension(S).



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/typetest/type_of-2.html">type_of / 2</A>, <A HREF="../../kernel/suspensions/make_suspension-3.html">make_suspension / 3</A>, <A HREF="../../kernel/suspensions/schedule_suspensions-2.html">schedule_suspensions / 2</A>, <A HREF="../../kernel/suspensions/suspensions-1.html">suspensions / 1</A>, <A HREF="../../kernel/suspensions/suspensions-2.html">suspensions / 2</A>
</BODY></HTML>
